package com.tkmybatis.hfy.config;
import com.tkmybatis.hfy.utils.RSAUtils;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.security.NoSuchAlgorithmException;
import java.security.interfaces.RSAPrivateKey;
import java.security.spec.InvalidKeySpecException;

@Configuration
public class TokenPrivateKeyConfig {

    private String privateKey="MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBANldKbaomjWxGEVB14a8ejTiv9BKbhq_ApEEXQp6epvRkWA8prn3hoi6ixRK_5VEIw_pfqRASvG-p_9qFIKqxUWI5cDRn5boVZKLCQBk6SC0dGdsN1QR0WY44Rxnz-3eUnbU7NvqtnMYOcxpqjgNbjDLoPG4TTBxdyjCJRovFqSPAgMBAAECgYA9-MbU0hstZbFyxYPqYUBCZcekXiQoMf9MUz8npqXgWQ6mroQmj0DnKLBQd9WIvCV2-u5lbAMyC1aghqEUZBXb53Fj4FlMh6szom6dRMeR6giCFFbmuwotrVkuBlL8lrRDamZjcS-YHdNzi_NGqX31OemlBTcCsnQ-QTBO5OurWQJBAP8JAmxMJGeGMUozzWGSNebP5pIcf9heC0V1AZqH3f-B-ZJoH-S7poTLCveKb5pMRDtkDGUU3NHYkD3vbNnwnqsCQQDaL6ukmBAMqHqlWjYFlrLhxusTm4GYdBJUSgMNKxX_tk4suSDsDqXBdathyA_ZEmenSNECOGV4JfNDy1uFlkGtAkBe2cTy7iaj8f6m8Dk0TqKJY00Hjl3l5KQggvHDvUBNZNOjJeKmuTunK7S6d9wl8LN3uy_48BdoXDjZMBC1xY3dAkAP8LOljsZ9ZkGvmuufdOcUv6elAxNww-oi5lVavO8ag4MqmUvicx-BBsvClQ8zWLjh69v5QY2IPZ2MMms5U0TxAkA3UR9FmQCHGMbYSVHF7_nENw6uhxo46NCjEKZ_cfvda1AcgmCojxsGXbMRIcf708wWEc1zT8vnfWsDXzebdRMO";

    @Bean
    public RSAPrivateKey tokenPrivateKey() throws InvalidKeySpecException, NoSuchAlgorithmException {
        return RSAUtils.getPrivateKey(privateKey);
    }
}
